package io.xxx.xbutler.client;

import io.xxx.xbutler.domain.Store;
import io.xxx.xbutler.domain.StoreOrder;
import lombok.extern.slf4j.Slf4j;
import org.springframework.data.util.Pair;
import org.springframework.stereotype.Component;

import java.time.LocalDate;
import java.util.List;

@Slf4j
@Component
public class StoreClientFallback implements StoreClient {

    @Override
    public Store getStore(Long id) {
        throw new RuntimeException("查询门店信息失败");
    }

    @Override
    public Pair<List<Long>, Long> getStoreIds(Long labelItemId, Long nextId) {
        throw new RuntimeException("查询门店ID列表失败");
    }

    @Override
    public LocalDate getPrimeDay(Long storeId) {
        log.error("查询门店会员日失败[{}]", storeId);
        throw new RuntimeException("查询门店会员日失败");
    }

    @Override
    public StoreOrder getStoreOrder(Long storeId, LocalDate date) {
        throw new RuntimeException("查询门店订单列表失败");
    }

    @Override
    public boolean match(Long storeId, Long labelItemId) {
        return false;
    }
}
